/*
 * About.java
 *
 * Created on March 22, 2007, 5:29 PM
 */

package d20chat;

import java.lang.Object;
import java.awt.*;

/**
 * A small window to display information about the program.
 * Displays version number, functional OS's, and the sourceforge website.
 */
public class About extends javax.swing.JFrame {
    
    //public D20Chat tempMain;
        
    /**
     * Class constructor for About.
     * Displays a simple window giving the version number and address of the website.
     * Clicking on the website will open a browser window pointed at the website.
     */
    public About() {
        initComponents();
        
        // Center About jFrame
        Dimension scrn = getToolkit().getScreenSize();
        this.setBounds( (scrn.width-getWidth())/2, (scrn.height-getHeight())/2, getWidth(), getHeight() );
    }
    
/********************************************************************************
  Method:
  Description:
  Parameters:
  Used by:
  Uses:
********************************************************************************/
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        projectURL = new javax.swing.JLabel();
        projectURL1 = new javax.swing.JLabel();

        setTitle("About D20 Chat");
        setResizable(false);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowOpened(java.awt.event.WindowEvent evt) {
                formWindowOpened(evt);
            }
        });

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel1.setText("D20 Chat Product Information");

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel2.setText("Product Version:");

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel3.setText("Operating System:");

        jLabel4.setForeground(new java.awt.Color(102, 102, 102));
        jLabel4.setText("D20 Chat 1.0");

        jLabel5.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel5.setText("Website:");

        projectURL.setForeground(new java.awt.Color(102, 102, 102));
        projectURL.setText("http://sourceforge.net/projects/d20-chat");
        projectURL.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                projectURLMouseClicked(evt);
            }
        });

        projectURL1.setForeground(new java.awt.Color(102, 102, 102));
        projectURL1.setText("Windows XP, Vista");
        projectURL1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                projectURL1MouseClicked(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel1))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2)
                            .addComponent(jLabel5)
                            .addComponent(jLabel3))
                        .addGap(23, 23, 23)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(projectURL1)
                            .addComponent(projectURL)
                            .addComponent(jLabel4))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addGap(20, 20, 20)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jLabel4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(projectURL1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(projectURL))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void projectURL1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_projectURL1MouseClicked
// TODO add your handling code here:
    }//GEN-LAST:event_projectURL1MouseClicked

    private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened

    }//GEN-LAST:event_formWindowOpened

    private void projectURLMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_projectURLMouseClicked
        BareBonesBrowserLaunch.openURL(this.projectURL.getText());
    }//GEN-LAST:event_projectURLMouseClicked
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel projectURL;
    private javax.swing.JLabel projectURL1;
    // End of variables declaration//GEN-END:variables
    
}
